<!--
 * @Author: LBH 1336709799@qq.com
 * @Date: 2024-11-13 20:10:17
 * @LastEditors: LBH 1336709799@qq.com
 * @LastEditTime: 2024-11-13 22:00:58
 * @FilePath: \Day04\医疗系统\hospitalsystem\src\components\detail.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div class="modal-mask" v-show="visible">
      <div class="modal-container">
        <div class="modal-header">
          <h3>就诊记录详情</h3>
          <span class="close-btn" @click="closebtn">X</span>
        </div>
        <div class="modal-body">
          <p><strong>就诊日期：</strong>{{ list.date }}</p>
          <p><strong>医生姓名：</strong>{{ list.doctor }}</p>
          <p><strong>诊断结果：</strong>{{ list.diagnosis }}</p>
          <p><strong>处方信息：</strong>{{ list.prescription }}</p>
        </div>
      </div>
    </div>
  </template>
  <script>
  export default{
    props:['visible','list'],
    methods:{
      closebtn(){
        this.$emit('update:visible',false)
      }
    }

  }
  </script>
  
  <style scoped>
  .hidden{
    display: none !important;
  }
  .modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .modal-container {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    max-width: 500px;
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .close-btn {
    cursor: pointer;
  }
  </style>
  